﻿using DotNetty.Framework.BaseModel;
using System.Threading.Tasks;

namespace DotNetty.Framework
{
    public interface IHttpWorker
    {

        /// <summary>
        /// 需要使用嘛
        /// </summary>
        /// <returns></returns>
        bool IsUseWorking<THttpContext>(THttpContext context) where THttpContext : AbstractHttpContext, new();

        /// <summary>
        /// 开始工作
        /// </summary>
        /// <returns>返回结果</returns>
        Task DoWorking<THttpContext>(THttpContext context) where THttpContext : AbstractHttpContext, new();
    }
}
